import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import getters from './getters'
import actions from './actions'
import mutations from './mutations'

/* modules 模块化管理Vuex */
import user from './modules/user.js'
import settings from './modules/settings.js'
import player from './modules/player.js'

Vue.prototype.$store = Vuex

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    user,
    settings,
    player
  },
  state,
  getters,
  actions,
  mutations
})
